<template>
  <div>
    <el-menu :default-active="defaultActive" router>
      <template v-for="item in data">
        <el-menu-item :key="item.key" :index="item.key">
          <i :class="item.icon" />
          <span>{{ item.name }}</span>
        </el-menu-item>
      </template>
    </el-menu>
  </div>
</template>

<script lang="ts" src="./menu.ts" />

<style lang="less" scoped>
.el-menu {
  border-right: none;
}
.el-menu-item {
  box-shadow: 0 1px 2px #0000001a;
}
.menu-hover {
  color: #2d9dfd;
  i {
    color: #2d9dfd;
  }
}
.el-menu-item.is-active {
  border-right: 3px solid #409eff;
}
</style>
